package com.darren.euc.dao.impl;


import java.util.List;

import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.darren.euc.dao.SourceOfChannelDao;
import com.darren.euc.entity.SourceOfChannel;


@Repository
public class SourceOfChannelDaoImpl extends BaseDaoImpl<SourceOfChannel, Integer> implements SourceOfChannelDao {
	
	@SuppressWarnings("unchecked")
	@Override
	public List<SourceOfChannel> getAll() {
		Session session = sessionFactory.getCurrentSession();	
		return session.createSQLQuery("select * from euc_source_channel where enable='1' order by display_sequence asc,convert(source_channel_name using gbk) asc;").addEntity(SourceOfChannel.class).list();
	}


}